﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ProjectSunny.Controls
{
    public partial class TopDichVuWebsite : System.Web.UI.UserControl
    {
        public int idbox;
        public string name;
      
        protected void Page_Load(object sender, EventArgs e)
        {
            DataTable dt = DAL.DCollector.DBCollector.Instance.StoredSelectTableWhereID("tbl_Category", "Category_ID1", idbox.ToString());
            name = dt.Rows[0]["Category_Name"].ToString();
            
            rpt_sanphammoinhat.DataSource = DAL.DCollector.DBCollector.Instance.CallSQL1Param("select * from tbl_ThietKeWebsite where Category_ID2="+idbox +" Order by ThietKeWebsite_Date LIMIT 1",true);
            rpt_sanphammoinhat.DataBind();

            rpt_TinLienQuan.DataSource = DAL.DCollector.DBCollector.Instance.CallSQL1Param( "select * from tbl_ThietKeWebsite where Category_ID2=" + idbox + " Order by ThietKeWebsite_Date LIMIT 4", true);
            rpt_TinLienQuan.DataBind();
        }
    }
}